package com.example.movie.adapter

import androidx.recyclerview.widget.DiffUtil
import com.example.common.entity.MovieVideoEntity

object MovieEntityComparator: DiffUtil.ItemCallback<MovieVideoEntity>() {

    override fun areItemsTheSame(oldItem: MovieVideoEntity, newItem: MovieVideoEntity): Boolean {
        return oldItem.id == newItem.id
    }

    override fun areContentsTheSame(oldItem: MovieVideoEntity, newItem: MovieVideoEntity): Boolean {
        return oldItem == newItem
    }
}